The OPC EIE device template file includes a section for quality bit mapping, which is specific only to the OPC device.
The qualityMapping section of the OPC EIE device template file is an optional section that provides a method to map OPC quality values to point status bits in the PNT. The quality bits represent the quality state for an item's data value. Only the quality bits that the user is interested in mapping need to be included in the device template file. If omitted, none of the quality bits will be mapped to CygNet status bits.
Each quality state may include the following attributes that map to CygNet point status bits in the PNT and indicate if the bit is set (true) or cleared (false):
See Point Status Bits for a description of CygNet status bits that can be mapped.
The low eight bits are defined in the form of three bit fields: Quality, Sub-status, and Limit status (QQSSSSLL). The following table describes OPC EIE Quality Mapping.
| Attribute | Description | |
|---|---|---|
|
mask |
The bit mask is applied to the quality state received from the OPC server.
|
|
|
value |
If the masked quality bits equal the value specified in the qualityMapping section of the device template file, an action is taken using the following attributes:
|
|
The following example displays a sample qualityMapping structure.
|
<qualityMapping> <StatBad mask="0xC0" value="0" setUnreliable="true"/> <StatUncert mask="0xC0" value="0x40" setUnreliable="true"/> <StatUnknwn mask="0xC0" value="0x80" setUnreliable="true"/> <!-- Quality 0 (bad) sub-status /--> <BadX mask="0xFC" value="0x00"/> <CfgErr mask="0xFC" value="0x04" setUser1="true"/> <NotConn mask="0xFC" value="0x08" setUser2="true"/> <DevFail mask="0xFC" value="0x0C" setUser3="true"/> <SensFail mask="0xFC" value="0x10" setUser4="true"/> <LastKnown mask="0xFC" value="0x14" setUser5="true"/> <CommFail mask="0xFC" value="0x18" setUser6="true"/> <OutOfSvc mask="0xFC" value="0x1C" setUser7="true"/> <!-- Quality 1 (Uncertain) sub-status /--> <UncertainX mask="0xFC" value="0x40"/> <NotInit mask="0xFC" value="0x20" setUser8="true"/> <LastUsable mask="0xFC" value="0x44" setUser9="true"/> <SensorCal mask="0xFC" value="0x50" setUser10="true"/> <EguExceed mask="0xFC" value="0x54" setUser11="true"/> <SubNormal mask="0xFC" value="0x58" setUser12="true"/> <!-- Quality 3 (good) sub-status /--> <GoodX mask="0xFC" value="0xC0"/> <Override mask="0xFC" value="0xD8" setUser13="true"/> <!-- Limit bits --> <LimitOk mask="0x03" value="0x00"/> <LimitLow mask="0x03" value="0x01" setUser14="true"/> <LimitHigh mask="0x03" value="0x02" setUser15="true"/> <LimitConst mask="0x03" value="0x03" setUser16="true"/> </qualityMapping> |